<template>
  <div class="class1">
      <input type="text" :value="value" @input="$emit('input', $event.target.value)">
      <button @click="changeSync">修改sync</button>
      <button @click="emitTest">释放emit</button>
  </div>
</template>
<script>
import app from './../main'
// @input 用户输入时触发
export default {
  props: ['value', 'syncTest'],
  data () {
    return {

    }
  },
  methods: {
     changeSync() {
        this.$emit('update:syncTest', 'syncSon')
      },
      emitTest(){
        app.$emit('busCode', 'hello world')
      }
  }
}
</script>
